<%@ include file="/WEB-INF/pages/common/taglibs.jsp" %>
<%@ include file="/WEB-INF/pages/common/checkpermission.jsp" %>
<%@ include file="/WEB-INF/pages/cases/case8/checkCase8Permission.jsp" %>

<script type="text/javascript">
    function saveRecord() {
        if (validationMonitorForm('<s:text name="label.required.prefix"/>')) {
            var checkDate = true;
            $("img[src$='iconCalendar.gif']", document.forms[0]).each(
                    function() {
                        if (checkDate) {
                            checkDate = validateJqueryDate(this, '<s:text name="date.format.error"/>');
                        }
                    }
                    );
            if (checkDate) {
                submitForm("addForm", "add.action");
            }
        }
        return false;
    }

    function cancelRecord() {
        submitForm("addForm", "search.action");
    }
    function fclick(obj, objButton) {
        with (obj) {
            scrollTop = event.y - offsetHeight / 2
            style.posLeft = event.x - offsetWidth / 2
        }
    }
</script>

<s:form name="addForm" action="" enctype="multipart/form-data">
    <table align="center" cellpadding="0" cellspacing="0" class="body_content full_width">
        <tr>
            <td align="left" valign="bottom" class="main_page_content_icon" width="4%">
                <img src='<c:url value="/images/body-icon_check.gif"/>' width="29" height="44">
            </td>
            <td valign="bottom" class="page_title_bg" width="96%"><span class="page_title"><s:text
                    name="label.case.select.title8"/></span></td>
        </tr>
        <tr>
            <td class="subcontent" colspan="2">&nbsp;</td>
        </tr>
    </table>
    <table border="0" align="center" cellpadding="0" cellspacing="0" class="body_content full_width bordered">
        <tr class="section_title">
            <td class="section_title" colspan="3">
                <font size="5"><s:text name="label.add.casesix.section1"/></font></td>
        </tr>
        <tr class="odd">
            <td class="form_label_padded" width="10%" nowrap><s:text name="label.casesix.title"/></td>
            <td class="form_label_padded" width="2%">:</td>
            <td class="txtData" align="left">
                <s:textfield name="caseEightModel.title" maxlength="100" size="100"/>
            </td>
        </tr>
        <tr class="even">
            <td class="form_label_padded" width="10%" nowrap valign="top"><s:text name="label.casesix.content"/></td>
            <td class="form_label_padded" width="2%" valign="top">:</td>
            <td class="txtData" align="left">
                <s:textarea name="caseEightModel.content" cols="120" rows="10"
                            onkeyup="checkTextAreaMaxLength(this,1000);"/>
            </td>
        </tr>

        <tr class="odd">
            <td class="form_label_padded" width="10%" nowrap><s:text name="label.upload"/></td>
            <td class="form_label_padded" width="2%">:</td>
            <td class="txtData" align="left">
                <input id="f_file">&nbsp;<input type="button" onmouseover="fclick(t_file,this)"
                                                value="<s:text name='label.browse'/>" class="button">
                <s:file name="caseEightModel.upload" contentEditable="false"
                        style="position:absolute;filter:alpha(opacity=0);width:30px;" id="t_file"
                        onchange="f_file.value=this.value"/>
            </td>
        </tr>
    </table>
    <table>
        <tr>
            <td class="txtData" colspan="3">
                <input type="button" class="button" value="<s:text name='label.save'/>" onclick="saveRecord();">
                <input type="button" class="button" value="<s:text name='label.back'/>" onclick="cancelRecord();">
            </td>
        </tr>
    </table>
</s:form>



